home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 026a / db3procs.zip / MAIN.PRG next >
Text File  |  1991-02-18  |  2KB  |  66 lines

  1. *---> Program:          Main.prg
  2. *---> Author:           Chris K. Kaufman
  3. *---> Last Update:      18-Feb-91
  4. *---> Purpose:          Demonstrate use of procedures in Procs.prg
  5. *---> Uses:             Procs.prg, Menu.dbf, Menu.ndx, Sample.dbf, Sample.ndx
  6.  
  7. *---> initialize evironment
  8. close all
  9. set device to screen
  10. set color to
  11. set talk off
  12. set echo off
  13. set status off
  14. set scoreboard off
  15. set escape off
  16. set procedure to procs
  17. *---> load menus
  18. select 9
  19. use menu index menuscrn
  20. *---> initialize menu selection
  21. mainsel = 0
  22. *---> main loop
  23. do while .t.
  24.   set color to 
  25.   do title with  'P R O C E D U R E   D E M O N S T R A T I O N   M E N U'
  26.   do menu with 'main menu ', mainsel
  27.   do case
  28.     case mainsel = 0
  29.       *---> menu
  30.       do menuinf
  31.     case mainsel = 1
  32.       *---> error message
  33.       do errmsginf
  34.     case mainsel = 2
  35.       *---> blank menu
  36.       do blmenuinf
  37.     case mainsel = 3
  38.       *---> title
  39.       do titleinf
  40.     case mainsel = 4
  41.       *---> clear window
  42.       do clrwininf
  43.     case mainsel = 5
  44.       *---> display instructions
  45.       do dinstinf
  46.     case mainsel = 6
  47.       *---> picklist
  48.       do plistinf
  49.     case mainsel = 7
  50.       *---> exit to dot prompt
  51.       set color to
  52.       clear
  53.       exit
  54.     case mainsel = 8
  55.       *---> quit to DOS
  56.       set color to
  57.       clear
  58.       quit
  59.     case mainsel = 9
  60.       *---> display help
  61.       do disphelp
  62.     otherwise
  63.       do errormsg with 'Invalid menu selection.  Press any key to continue.'
  64.   endcase
  65. enddo
  66.